#define _CRT_SECURE_NO_WARNINGS 1
#include"SList.h"

void Test01()
{
	SLTnode* plist = NULL;
	PushBack(&plist, 1);
	PushBack(&plist, 2);
	PushBack(&plist, 3);
	PushBack(&plist, 4);
	SLT_print(plist);
	PushFront(&plist, 5);
	SLT_print(plist);
	PushFront(&plist, 6);
	SLT_print(plist);
	PushFront(&plist, 7);
	SLT_print(plist);
	Destory(&plist);
	SLT_print(plist);
}
void Test02()
{
	SLTnode* plist = NULL;
	PushBack(&plist, 1);
	PushBack(&plist, 2);
	PushBack(&plist, 3);
	PushBack(&plist, 4);
	SLT_print(plist);
	PopBack(&plist);
	SLT_print(plist);
	PopBack(&plist);
	SLT_print(plist);
	PopBack(&plist);
	SLT_print(plist);
	PopBack(&plist);
	SLT_print(plist);
}
void Test03()
{
	SLTnode* plist = NULL;
	PushBack(&plist, 1);
	PushBack(&plist, 2);
	PushBack(&plist, 3);
	PushBack(&plist, 4);
	SLT_print(plist);
	PopFront(&plist);
	SLT_print(plist);
	PopFront(&plist);
	SLT_print(plist);
	PopFront(&plist);
	SLT_print(plist);
	PopFront(&plist);
	SLT_print(plist);
}
void Test04()
{
	SLTnode* plist = NULL;
	PushBack(&plist, 1);
	PushBack(&plist, 2);
	PushBack(&plist, 3);
	PushBack(&plist, 4);
	SLT_print(plist);
	SLTnode* pos = FindData(plist, 3);
	PushPosBack(pos, 88);
	SLT_print(plist);
	PopPosBack(pos);
	SLT_print(plist);
}
void Test05()
{
	SLTnode* plist = NULL;
	PushBack(&plist, 1);
	PushBack(&plist, 2);
	PushBack(&plist, 3);
	PushBack(&plist, 4);
	SLT_print(plist);
	SLTnode* pos = FindData(plist, 1);
	PushPosFront(&plist, pos, 77);
	SLT_print(plist);
	PopPos(&plist, pos);
	SLT_print(plist);
}
int main()
{
	//Test01();
	///Test02();
	//Test03();
	//Test04();
	Test05();
	return 0;
}